package com.gitee.feizns.web.boot.validate;

import com.gitee.feizns.web.dao.ar.AbstractModel;
import com.gitee.feizns.web.domain.result.Err;
import com.gitee.feizns.web.mvc.validate.AbstractConstraintValidator;

import java.util.Map;

/**
 * @see ValidateProperties
 * @author feizns
 * @since 2019/7/20
 */
public interface ValidateConfigurer {

    /**
     * 错误码映射.
     * @return
     */
    default void extendsValidateErrorMapping(Map<String, Err> registry) { }

    /**
     * 实体类与存在实体之间，错误码的映射
     * @param registry
     */
    default void extendsEntityErrorMapping(Map<Class<? extends AbstractConstraintValidator>, Map<Class<? extends AbstractModel>, Err>> registry) { }

}

